package com.mariadb.adapter.columnstorebulkconnector.runtime.adapter;

import com.informatica.sdk.adapter.javasdk.dataadapter.AdapterPlugin;
import com.informatica.sdk.adapter.javasdk.common.InfaUtils;
import com.informatica.sdk.adapter.javasdk.dataadapter.Connection;
import com.informatica.sdk.adapter.javasdk.dataadapter.DataAdapter;
import com.informatica.sdk.adapter.javasdk.dataadapter.DataSourceOperationAdapter;
import com.informatica.sdk.adapter.javasdk.dataadapter.PluginInfo;
import com.informatica.sdk.adapter.javasdk.common.Logger;
import com.informatica.sdk.adapter.javasdk.common.EStatus;

public class ColumnStoreBulkConnectorTablePlugin extends AdapterPlugin  {

    private Logger logger = null;


    /**
     * This method must be implemented by adapter developer. This method will be
     * called by SDK framework at the plugin loading time. Adapter developer
     * needs to provide plugin info in this API. SDK framework will make
     * compatibility checks before enabling this plugin.
     * 
     * @param pluginInfo
     *            plugin information
     * @ret EStatus
     *************************************
     * AUTOGENERATED CODE : DO NOT CHANGE
     *************************************
     */

    @Override
    public int initPlugin(PluginInfo pluginInfo, InfaUtils infaUtils){
    		this.logger = infaUtils.getLogger();
    		pluginInfo.setPluginDescription("Connector for MariaDB ColumnStore");
    		pluginInfo.setPluginName("com.mariadb.adapter.columnstorebulkconnector.libraryInfo.TABLECOLUMNSTOREBULKCONNECTORLIBRARYINFO");
    		pluginInfo.setPluginVersion("1.0.0");
    		return EStatus.SUCCESS;
    }



    /**
     * get adapter specific connection class instance
     * @return connection instance
     *************************************
     * AUTOGENERATED CODE : DO NOT CHANGE
     *************************************
     */

    @Override
    public Connection createConnection(){
    	return new ColumnStoreBulkConnectorTableDataConnection(logger);
    }



    /**
     * get adapter specific data adapter instance
     * @return data adapter instance
     *************************************
     * AUTOGENERATED CODE : DO NOT CHANGE
     *************************************
     */

    @Override
    public DataAdapter getDataAdapter(){
    	return new ColumnStoreBulkConnectorTableDataAdapter();
    }



    /**
     * get adapter specific DSO adapter instance.
     * Adapter developer may optionally implement this api to return 
     * adapter specific data source operation adapter if it needs to 
     * perform some init/deinit tasks common to all partitions 
     * at beginning/end of mapping run.
     * @return DSO adapter instance
     *************************************
     * AUTOGENERATED CODE : DO NOT CHANGE
     *************************************
     */

    @Override
    public DataSourceOperationAdapter getDataSourceOperationAdapter(){
    	return new ColumnStoreBulkConnectorTableOperationAdapter(logger);
    }


}